import { BASEURL } from "../../api/config";

type timeData = {
  time: string;
};

const getBootTime = async () => {
  return new Promise(resolve => {
    fetch(`${BASEURL}/oshandler`)
      .then(res => res.json())
      .then((json: timeData) => {
        resolve(json.time);
      });
  });
};

export { getBootTime };
